package com.my.coolq.api.request;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * 加群
 * @author ch
 *
 */
public class AddGroupRequest implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -6732261318973927524L;

	/**
	 * 加好友请求的 flag（需从上报的数据中获得）
	 */
	private String flag;
	
	/**
	 * add 或 invite，请求类型（需要和上报消息中的 sub_type 字段相符）
	 */
	private String type;
	
	/**
	 * 是否同意请求 默认 ture
	 */
	private Boolean approve;
	
	/**
	 * 拒绝理由（仅在拒绝时有效）
	 */
	private String reason;
	

	public AddGroupRequest() {
		super();
	}

	public AddGroupRequest(String flag, String type, Boolean approve) {
		super();
		this.flag = flag;
		this.type = type;
		this.approve = approve;
	}

	public AddGroupRequest(String flag, String type, Boolean approve, String reason) {
		super();
		this.flag = flag;
		this.type = type;
		this.approve = approve;
		this.reason = reason;
	}

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Boolean getApprove() {
		return approve;
	}

	public void setApprove(Boolean approve) {
		this.approve = approve;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}
	
	@Override
	public String toString() {
		return JSON.toJSONString(this, SerializerFeature.UseISO8601DateFormat);
	}
	
}
